function request( data , method , url , dataType = "text" , contentType = true , async = true ){
    return new Promise( (resolve)=>{
        ajax({
            url,
            data,
            async,
            method,
            dataType,
            contentType,
            successCB: res => {
                resolve(res);
            }
        });
    });
}

const login = data=>request( data , 'post' , '../php/login.php' , 'json' );
const getList = data=>request( data , 'post' , '../php/getData.php' , 'json' );